tests/pull-corruption: Ensure we corrupt an object to be pulled
authorColin Walters <walters@verbum.org>
Sun, 19 Jan 2014 17:39:38 +0000 (12:39 -0500)
committerColin Walters <walters@verbum.org>
Sun, 19 Jan 2014 18:19:10 +0000 (13:19 -0500)
commit3802a0679b5b0ef7a434c09e2c16b97141fe1cee
tree77df0d978c414020c8132e3ae845f1ec84e931e1
parentf841313206626671300b5a2436a19cd5b92715bf
tests/pull-corruption: Ensure we corrupt an object to be pulled

This test had some nondeterminism because we chose a random
object to corrupt, but because there were multiple commits, it
was possible that we chose an object that was not being pulled.

Fix this by writing some custom GJS code to find an explicitly random
object that exists in a given ref, an change a random byte offset.
This adds a lot more randomness to the testing too.
Makefile-tests.am
tests/corrupt-repo-ref.js [new file with mode: 0644]
tests/test-pull-corruption.sh